home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 4 / FM Towns Free Software Collection 4 - Disc 1.iso / msdos / cache / source / defs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-19  |  1.6 KB  |  98 lines

  1.  
  2. #define    TRUE        1
  3. #define    FALSE        0
  4. #define    ERR        (-1)
  5.  
  6. #define    uchar        unsigned char
  7. #define ushort        unsigned short
  8. #define    uint        unsigned int
  9. #define    ulong        unsigned long
  10.  
  11. #define    MAX_DEV        16
  12. #define    MAX_SEC        1024
  13. #define    MAX_HASH    16
  14. #define    HASH(s)        ((s)&15)
  15.  
  16. #define    USE_DEV        0xFF
  17. #define    FRE_DEV        0xFE
  18. #define    CHE_DEV        0
  19.  
  20. typedef struct _BP {
  21.     struct _BP  *next;
  22.     uchar    sum;
  23.     uchar    dev;
  24.     long    sec;
  25. } SEC_PTR;
  26.  
  27. typedef struct {
  28.     char far    *next;
  29.     short    dev_sts;
  30.     short    str_ent;
  31.     short    int_ent;
  32.     char    res[8];
  33. } DEVHED;
  34.  
  35. typedef struct _DPB {
  36.     uchar    DrvNum;
  37.     uchar    UnitNum;
  38.     short    SecLen;
  39.     uchar    SecAlc;
  40.     uchar    Shift;
  41.     short    ResSec;
  42.     uchar    FatLen;
  43.     short    DirEnt;
  44.     short    DatSec;
  45.     short    MaxCls;
  46.     uchar    FatSec;
  47.     short    DirSta;
  48.     DEVHED far    *DevEnt;
  49.     uchar    MedId;
  50.     uchar    DskCng;
  51.     struct _DPB far *NxtDPB;
  52.     short    CurDir;
  53. } DPB;
  54.  
  55. typedef struct {
  56.     short    SecLen;
  57.     uchar    SecAlc;
  58.     short    ResSec;
  59.     uchar    FatLen;
  60.     short    DirEnt;
  61.     short    MaxSec;
  62.     uchar    MedId;
  63.     short    FatSec;
  64. } BPB;
  65.  
  66. typedef struct _RH {
  67.     uchar    len;
  68.     uchar    unit;
  69.     uchar    cmds;
  70.     short    stat;
  71.     uchar    res[8];
  72.     uchar    md_id;
  73.     union {
  74.     struct {
  75.         short    now_sts;
  76.     } chk;
  77.     struct {
  78.         uchar far    *work;
  79.         BPB far    *bpb;
  80.     } build;
  81.     struct {
  82.         uchar far    *buff;
  83.         short    count;
  84.         short    sect;
  85.     } rdwt;
  86.     struct {
  87.         char    mode;
  88.         char    max_dev;
  89.         DPB far    *dpb_ptr;
  90.         SEC_PTR far    *lru_tbl;
  91.         SEC_PTR far    *use_tbl;
  92.     } ext;
  93.     struct {
  94.         ushort    psp_seg;
  95.     } quit;
  96.     } x;
  97. } REQ;
  98.